import { Entity, Column, Unique, Index } from 'typeorm'
import { BaseEntity } from '../global'

@Entity('global_geo')
export class GlobalGeo extends BaseEntity {
    @Column('decimal', { precision: 10, scale: 6, nullable: true, comment: '经度' })
    lng: number

    @Column('decimal', { precision: 10, scale: 6, nullable: true, comment: '纬度' })
    lat: number

    @Column({ length: 32, default: '', comment: '国' })
    country: string

    @Column({ length: 32, default: '', comment: '省' })
    province: string

    @Column({ length: 32, default: '', comment: '市' })
    city: string

    @Column({ length: 32, default: '', comment: '区' })
    district: string

    @Column({ length: 64, default: '', comment: '街' })
    township: string

    @Column({ length: 256, default: '', comment: '地址' })
    address: string
}
